<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<style>
  .box {
    padding: 16px 10px;
  }

  .basic,.basic1 {
    padding: 0 12px;
    background: #fff;
    border: 1px solid;
  }

  .basic:hover, .basic1:hover {
    color: white;
    background: skyblue;
  }

  .basic1:hover {
    transition: all .5s;
  }

</style>
<body>
  <div class="box">
    <button class="basic">demo</button>
    <button class="basic1">transition-demo</button>
  </div>
</body>
</html>